Conventionally, techniques for eliminating the inclination of a camera have been proposed. In such techniques, an inclination of a camera is reduced by extracting edges in an image, and then, assuming that the inclination of an edge having the largest length is the inclination of the camera, affine transform is performed to image data to eliminate the inclination of the edge having the largest length (e.g., see Patent Reference 1).
Moreover, a technique for extracting a vertical edge in an image and detecting an inclination of the image from the vertical edge is disclosed in Non-patent Reference 1.
(Patent Reference 1) Japanese Laid-Open Publication No. 4-314274 (Page 2, FIG. 1)
(Non-patent Reference 1) Hidekazu Ohmi and Fumihiko Saitoh, “Image Inclination Measurement Based on Edge Directions and an Analysis of Relation between Visual Inclination”, MVA2002 IAPR Workshop on Machine Vision Application, Dec. 11-13, 2002.
Problems that the Invention is to Solve
In image capturing, an image is normally captured in illumination from above. Therefore, the ground, the floor or the like often comes out in a lower portion of the image. If processing such as roll correction and backlight correction is performed to such an image based on feature data of the entire image, desired correction effects can not be achieved in many cases.
For example, in roll correction of an image for making perpendicular edges of an artificial object be vertical in the image, when detection of edges is performed in the entire image, the floor or the ground comes out under the object and thus roll correction is influenced by edges contained in the image of the floor or the ground. Therefore, roll correction might not be properly performed.
Moreover, in exposure correction such as backlight correction, it is highly possible that intensity distribution is largely different between an upper portion and a lower portion of the image. Therefore, when feature data of the entire image is used, there may be cases where desired correction effects can not be achieved.
In view of the above-described problems, it is therefore an object of the present invention to make it possible to execute correction of an image captured by a camera in a more proper manner than in the known techniques.